UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'gremKeGB+T3Vh1EzswKzyIXDBIUkgn3u9cNYUQR/LRA=' 
WHERE 
  key_id = '85fb803af8d7162594a1e1e437f0d2ca2eb53941b4f4c8e4a8aae38f0bde6260' 
  AND (
    token = 'gremKeGB+T3Vh1EzswKzyIXDBIUkgn3u9cNYUQR/LRA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043