UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'J/xjWeqEEXHib+OdeyMyw89or6BtwV/2gxgp63o0d8Q=' 
WHERE 
  key_id = 'e618ce85200dc129bfa124f2813d7a1d7b880f5d73927107b0bfdaf8bdacbb77' 
  AND (
    token = 'J/xjWeqEEXHib+OdeyMyw89or6BtwV/2gxgp63o0d8Q=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018