UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VxJYUSyyydQpSye4UyKuv1/Tu2cOgu8xyji/mC4EDx0='
WHERE
key_id = '1d1e38823ffce1a3a87d9e56df61aae1031f7683ad53a020a8d6db0acc3ece3d'
AND (
token = 'VxJYUSyyydQpSye4UyKuv1/Tu2cOgu8xyji/mC4EDx0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)