UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Sg626PJlw0J92bwrUI4EnbPEr+M4GT4LqmRNFHVRc1I=' 
WHERE 
  key_id = '7b700fd3929dbc4cdbdcc3905c3a6882618fb6c3f8e2c57f884e94b47c8b540e' 
  AND (
    token = 'Sg626PJlw0J92bwrUI4EnbPEr+M4GT4LqmRNFHVRc1I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022