UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nrfOjweLOQXMK7NoaqKgwJnSw/gnpudyRk9Jk0fM3Xs='
WHERE
key_id = '2823e0201c7b68a3fa88e8bfb5f42ef52cf66cf5b73f6d5873a063fefbcfbfe2'
AND (
token = 'nrfOjweLOQXMK7NoaqKgwJnSw/gnpudyRk9Jk0fM3Xs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)