UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WQfC4ssiDLU/zVHZLxhTIi7KSxVgec7M9xbD183wFwk='
WHERE
key_id = '119332656f1eb8a4d7f1edcfc2f3146be6676eac88a5e53a4fc1674dd8b8e77f'
AND (
token = 'WQfC4ssiDLU/zVHZLxhTIi7KSxVgec7M9xbD183wFwk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)