UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CJbboArgv0v93MKZRH4NrZuGmCRTYTN6Z2rZaLB1pL0=' 
WHERE 
  key_id = '68602409725049cfebaf6bd87f3d9eacb4e4e9df66a4f4ac4cd8fc4bb5fa0772' 
  AND (
    token = 'CJbboArgv0v93MKZRH4NrZuGmCRTYTN6Z2rZaLB1pL0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047