UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ggsg8PabkunMz9BzyVruYV0g9uH19FRmgwglcR2vgKg='
WHERE
key_id = '094e89f2876940714bb6839e488e470d74fc9555dac6583b97ea1ed0b8039755'
AND (
token = 'Ggsg8PabkunMz9BzyVruYV0g9uH19FRmgwglcR2vgKg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)