UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LH8ofd4mfv4qoKXx5bNfbcO63D/m3FpsrhOPnnLz5/0='
WHERE
key_id = '13613d959852461cb85b8d1af54885469f22db99d7eff1924b790bf13dac29b5'
AND (
token = 'LH8ofd4mfv4qoKXx5bNfbcO63D/m3FpsrhOPnnLz5/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)