UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wb8ykoLOimMtVNwPsW/xwHMzYOcwiIsaLBHvkNCOgbg='
WHERE
key_id = '6ad70b48deb2c936c298fec9087cb07d9175c1dbca549003b82ff2f584f32175'
AND (
token = 'wb8ykoLOimMtVNwPsW/xwHMzYOcwiIsaLBHvkNCOgbg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)