UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nLLxmjXQuxoCwdWvu+dv1joPcDB3VJ/r7BlrvzCIck4='
WHERE
key_id = '53c84621ba14c93c6c8e2c167c6bba92b29d25811dd9598225f0f4a428b490ac'
AND (
token = 'nLLxmjXQuxoCwdWvu+dv1joPcDB3VJ/r7BlrvzCIck4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)