UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QiM/TkBPlnZ/rswV3izgwJXHRJ+cQIOl7N4a4r6sBlg='
WHERE
key_id = 'd3c732c9747f473514fdea84a500e156fd070b086adfda0cbfda62a38551a31a'
AND (
token = 'QiM/TkBPlnZ/rswV3izgwJXHRJ+cQIOl7N4a4r6sBlg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)