UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kXD+ovPKa4MqzBGdNdffjtM/C3HrNu9LhrD9KDEkkF4=' 
WHERE 
  key_id = '1c3de487ff83c3997d505b3f4492cef77c83fdaa1b0d9ed8b80fe22a4b024067' 
  AND (
    token = 'kXD+ovPKa4MqzBGdNdffjtM/C3HrNu9LhrD9KDEkkF4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030