UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ufMIo8R0SVojOmVU8EIF6JFql5Hn+IxH4UEdExKq5sA='
WHERE
key_id = '4c818d54eac1a235205634f0aa415ed1808a2bca86ffe60e8a557aa4a1d09531'
AND (
token = 'ufMIo8R0SVojOmVU8EIF6JFql5Hn+IxH4UEdExKq5sA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)