UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Kznbne32zg6LIP0CfwNKwkKf9RGbL9vcnoOHASPHLXQ='
WHERE
key_id = '01f2c07cf62e398cb8d4996e0aafcd21a43c4e2bf0930064b5eaa52080c7b16c'
AND (
token = 'Kznbne32zg6LIP0CfwNKwkKf9RGbL9vcnoOHASPHLXQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)