UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e6b9ZNt+i2irOUPrI2pm7U1r3A+GPR/0HSniw64BZig='
WHERE
key_id = '8e08346f5bfad9a97d8eab70770c947b9c1510d3547e88fd6bd478a4ba44b598'
AND (
token = 'e6b9ZNt+i2irOUPrI2pm7U1r3A+GPR/0HSniw64BZig='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)