UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4IHx+tHXu+CxTXQxu6zJ/OO+5Jc+Em7yM9+8eO6vkWs='
WHERE
key_id = '9259d16d65ae7ea89b4b6683dd4fca67e8b099dc63a1b0570c7a481711bf0dce'
AND (
token = '4IHx+tHXu+CxTXQxu6zJ/OO+5Jc+Em7yM9+8eO6vkWs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)