UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8FhujfZh6gc2QuHSZeTJCUoF9UxVdVDhojgR8J6UAIM=' 
WHERE 
  key_id = '47c68d71dbf32c0515115da4294877b4ad537e330deb0a8fa50f110490c38f7b' 
  AND (
    token = '8FhujfZh6gc2QuHSZeTJCUoF9UxVdVDhojgR8J6UAIM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022