UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Y/vOIcSQBB+5tFSm1s9a8YzFIlsC4NCHIqM/MmkW03I=' 
WHERE 
  key_id = 'c3fd9e3ead902fe5a429fd8fa292dbb1da1acf3d843ceedabeddd578e7c4b97c' 
  AND (
    token = 'Y/vOIcSQBB+5tFSm1s9a8YzFIlsC4NCHIqM/MmkW03I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00013