UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vwR2l9hk2UAX8TI7lUpzqFDX0fpLy2Q7unxq5nmWA/I=' 
WHERE 
  key_id = '97ee88f5fdd7a9ba3620081a6e5d9ee2c2337f6b2bf37e215a0157a61c8ed411' 
  AND (
    token = 'vwR2l9hk2UAX8TI7lUpzqFDX0fpLy2Q7unxq5nmWA/I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018