UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+wEzcgKtCRugqXe94QlN2SdBYKoTPfCg/411Hj/rXIU='
WHERE
key_id = 'bc4a36ef3841982734ae508e56d2d8bef2fe21d67f2830ab70f7e0043d6aebd6'
AND (
token = '+wEzcgKtCRugqXe94QlN2SdBYKoTPfCg/411Hj/rXIU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)