UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bUXfd6zgOrggTtPc0FvUlQpLkNm8q+GBd6hwo54m9Hk='
WHERE
key_id = '14c2e195dfbd76deb043bea730e7dea6d87c46b212232e3d91943f89317fba77'
AND (
token = 'bUXfd6zgOrggTtPc0FvUlQpLkNm8q+GBd6hwo54m9Hk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)