UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VOzGhFmyEydNtTogqUNj//RtuyuOexfcC2mw5+SgDKM='
WHERE
key_id = '4576112b7ace464cb7056367b177aa28ce675bab12d29969cd91167c470278bb'
AND (
token = 'VOzGhFmyEydNtTogqUNj//RtuyuOexfcC2mw5+SgDKM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)