UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '88czgQf/oFkQeZarMkQhiKAe2Uu4oVNzjJXyuwXeSGM='
WHERE
key_id = '0b0baac41903f77e73235f5318afacc356e9b01bb700883696ec3c68d69a13f7'
AND (
token = '88czgQf/oFkQeZarMkQhiKAe2Uu4oVNzjJXyuwXeSGM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)