UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FNHbu3aTcJ/Bzwx/M/M7MyiWdpwm6KE00c2sDKtbUWY='
WHERE
key_id = '0ac9df6c1dc084d70e03c32bd8068730ed28311ea2ab6718d2a164a8ada2a547'
AND (
token = 'FNHbu3aTcJ/Bzwx/M/M7MyiWdpwm6KE00c2sDKtbUWY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)