UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+s7ECAbNqfhvKwtnRSqODAU6D76I3xNnE1MksxKlFI8=' 
WHERE 
  key_id = '28b52535503da619c47f26028fc924434e51464e7af31ab45ac1b1b10554d7b0' 
  AND (
    token = '+s7ECAbNqfhvKwtnRSqODAU6D76I3xNnE1MksxKlFI8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017