UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vfc5JFwQyTCOOuXhHdr+BcIrmSyioEdGKi4FGYNY36M=' 
WHERE 
  key_id = '69e3ec57a0e877e261ae737638497dd7375cf1b6ba32954bab48f1d582467f5c' 
  AND (
    token = 'vfc5JFwQyTCOOuXhHdr+BcIrmSyioEdGKi4FGYNY36M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038