UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6kK0iXxIq5CgYDsPtlxJ5XP8xYFJ3Mp/t1jUFtQbekE='
WHERE
key_id = '3aa1555a273bb4ebcc192a5cf29c5ed4271e5252c51aa52a5aeac263cdc0b377'
AND (
token = '6kK0iXxIq5CgYDsPtlxJ5XP8xYFJ3Mp/t1jUFtQbekE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)