UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iOH8BEX6EUjBBz9sZ09D3KNtIotUvxU6t3tomaT73gE='
WHERE
key_id = 'fb08635c6acc9cacc14914e8f910576771289a002efaf7e5335d5ed423077aed'
AND (
token = 'iOH8BEX6EUjBBz9sZ09D3KNtIotUvxU6t3tomaT73gE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)