UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/zIGMgkN6oUZOaTc/QAhE2FtBcOYpu7Ez3A/FdMobcc=' 
WHERE 
  key_id = '031e781a8af82e36b8ed6b9cf76f089e62e5431ae8c9dcd3735ffc838a782f37' 
  AND (
    token = '/zIGMgkN6oUZOaTc/QAhE2FtBcOYpu7Ez3A/FdMobcc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046