UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 't9BNy4yKJh+XfzQCe4tx06vNR5pgbpvyO1UFhfkKHq8=' 
WHERE 
  key_id = 'b93ba723a2bf9bd4b4ede55a58624e094eff3bc1e4d5a44b87aa06a7ccc5b14c' 
  AND (
    token = 't9BNy4yKJh+XfzQCe4tx06vNR5pgbpvyO1UFhfkKHq8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00061