UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aEYTA/apymSf8ujSD25gx/Z9AbNBCrh6vmzr9TFaSZQ='
WHERE
key_id = 'df0ac1510122768bea7b1de778287f2825368721a90cc348ec619361444b1075'
AND (
token = 'aEYTA/apymSf8ujSD25gx/Z9AbNBCrh6vmzr9TFaSZQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)