UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tF1ynviZsUPRwUjSZHCgjrTl+FBZSROFzKVEvVJwOX4='
WHERE
key_id = '907c1669f5ff151af0c14cb105b91996afb1527af3e99d0b4ad4cec480d06a4e'
AND (
token = 'tF1ynviZsUPRwUjSZHCgjrTl+FBZSROFzKVEvVJwOX4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)