UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/F6svM+QBsVerupubtCmNCuVll1cP3/tZtWWpgMMbhg='
WHERE
key_id = 'd7236530b508f232bd26434a38035ca71c1c9a100b6b34eea8bba0ca740bd27e'
AND (
token = '/F6svM+QBsVerupubtCmNCuVll1cP3/tZtWWpgMMbhg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)