UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6kzAKjRKciTWIwhWIwGVFpO7jhg/ksc0O0w5NF25p7w='
WHERE
key_id = 'e1633ad2ede15fc9b66f52653855fde7a4d3fec721c5255a20782e0f7d2421c4'
AND (
token = '6kzAKjRKciTWIwhWIwGVFpO7jhg/ksc0O0w5NF25p7w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)