UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vw7PSvxqRf79MlCRsNLW0CivOURkjn2OsmZTrx3e9so='
WHERE
key_id = 'b05eaa6a78b490e0f211e0d44fe674ac25f8d96c0c576bfa4b1877650a51bd17'
AND (
token = 'Vw7PSvxqRf79MlCRsNLW0CivOURkjn2OsmZTrx3e9so='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)