UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'X1bYcz48aReOyE/3ZE6yfbPFxcOoR/2eMmcg4SCz/cc='
WHERE
key_id = '9ce18a613aff16de0a43ec2e93377ffadb2e6a068d97774ab4005da5f75a02f6'
AND (
token = 'X1bYcz48aReOyE/3ZE6yfbPFxcOoR/2eMmcg4SCz/cc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)