UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+qyhgeVQ4RzVQSHfGfEWeP/37ba/SCqM4ZaXmrHfJnQ='
WHERE
key_id = '81b8e470de1073df44b5c37468e648b802f52608016b764ad8698069ebe535c3'
AND (
token = '+qyhgeVQ4RzVQSHfGfEWeP/37ba/SCqM4ZaXmrHfJnQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)