UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1Drd1rZn4BNB4xkiS1dEi8M3kuA8zDUKBRT4m7g47Zs='
WHERE
key_id = '53522eed00331f12e4e9eaaed2cae9c74e045e06881857cc3e8091b771ae35db'
AND (
token = '1Drd1rZn4BNB4xkiS1dEi8M3kuA8zDUKBRT4m7g47Zs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)