UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HMf/OJJFBMoc0eGhELmHJ56D1vuAC+C8GZ/O6oXa1XA=' 
WHERE 
  key_id = '5e17a44ab483bb2fd9508091238262b0426217e63ae5103689dfc3309eb4236a' 
  AND (
    token = 'HMf/OJJFBMoc0eGhELmHJ56D1vuAC+C8GZ/O6oXa1XA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014