UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZglmWE9oXSkGj64Yej7gDHC59Tw1rZAvtN+RwJ0s/6E='
WHERE
key_id = 'd4e777ae9fdc427dda656c40ddb6a037d0eb9273745e8ad19f0c786e8031d448'
AND (
token = 'ZglmWE9oXSkGj64Yej7gDHC59Tw1rZAvtN+RwJ0s/6E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)