UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZFtoJFLIVbk8slDQ7bC5x8AqYBoUOhHM8ocGY8okhDc=' 
WHERE 
  key_id = '919523d425ab2da230dfcf6173d3200b194536e1a3fc91684b7a87e68351f1fc' 
  AND (
    token = 'ZFtoJFLIVbk8slDQ7bC5x8AqYBoUOhHM8ocGY8okhDc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018