UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zvGqihblI7+mby6KBSP0FKCevLLME30/TxvM01hr8aY='
WHERE
key_id = '80cb0961b7f81eaae07a70224b0281532f9b8fea735de12bb16a669a349134a0'
AND (
token = 'zvGqihblI7+mby6KBSP0FKCevLLME30/TxvM01hr8aY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)