UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zT6yBai2+YxYFetYs8C+QviWeEuoTp9GD/3a/3hhoOM=' 
WHERE 
  key_id = 'f8a8344d0938d00f4518aca4c7a46eba2a6fd993c7e97972bdb77488a3fc432c' 
  AND (
    token = 'zT6yBai2+YxYFetYs8C+QviWeEuoTp9GD/3a/3hhoOM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015