UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cGSQfr112F8/1d/kZrPH8yN8Ne/1oTfU0lgZqF8AjnY='
WHERE
key_id = 'ee33c429f7e0d718409c078ec6c49bacc919ef99073f191a8c3ccbfc1f3e7364'
AND (
token = 'cGSQfr112F8/1d/kZrPH8yN8Ne/1oTfU0lgZqF8AjnY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)