UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7wkexHFhElf0lJgukZgKvaG4uZZsz7Ie6Md9HdV/La0='
WHERE
key_id = 'b2608bf1a669f7ca1774465e2706d107416a42d9885bee6ae89c65ec90341f44'
AND (
token = '7wkexHFhElf0lJgukZgKvaG4uZZsz7Ie6Md9HdV/La0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)