UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QwM34fcmv7aFMFn9JIN6LYvDtn2pRjfpQwEkc0dAW78='
WHERE
key_id = '82434f34d827cbe7ce4fb183b715d1bcf3ce4fb5d4c429e03d42128513aa51c7'
AND (
token = 'QwM34fcmv7aFMFn9JIN6LYvDtn2pRjfpQwEkc0dAW78='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)