UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QvnJQcqs0l9AMHoZsqP5Xj6MzSUzyVKXHvn5W9SW1oE='
WHERE
key_id = '33f7175dd62ce095c018f1427937bb98fe587280ae4e01721208c98f4cfee0dc'
AND (
token = 'QvnJQcqs0l9AMHoZsqP5Xj6MzSUzyVKXHvn5W9SW1oE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)