UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'G97wqQIbfrao86Q/SxpmiT8eeXG2ghIL2kvyLV/cBP8=' 
WHERE 
  key_id = '0033731fb28ca0a0afc794d9329d23eef97c7f5cc5cb755ad6754d4434616c71' 
  AND (
    token = 'G97wqQIbfrao86Q/SxpmiT8eeXG2ghIL2kvyLV/cBP8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030