UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5kmVIEIn1KTDiOrh5gZSt/h28td9Rh0VxJWFNZa8W/o=' 
WHERE 
  key_id = '8ed357ce05d3d53a9f839dc0322ffe084e3dc7ecb2cc86e743f040831759c1c9' 
  AND (
    token = '5kmVIEIn1KTDiOrh5gZSt/h28td9Rh0VxJWFNZa8W/o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016