UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FAFrElJnG5w90r4Gr4ve1TE34+BKcrwsOkvdlrP4zo8=' 
WHERE 
  key_id = '5e627da7f47f48126485ad27b19d4525c0db250335b179e487ab11bda170a56f' 
  AND (
    token = 'FAFrElJnG5w90r4Gr4ve1TE34+BKcrwsOkvdlrP4zo8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022