UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xcfmUzJyGV3Hv2vDNh/cl/1PuwAUk9++5PgOGKofiAs='
WHERE
key_id = '3475aeeddc2bd6dd3a0022a806d78dd4170c9bab9f0ef27a839a96bc7c4cac95'
AND (
token = 'xcfmUzJyGV3Hv2vDNh/cl/1PuwAUk9++5PgOGKofiAs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)