UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Po9s8Xt0lGjQzd1AC+Jhm+WhOPJxBH/HbuassXya1GM='
WHERE
key_id = '06be7d10fd4c052da1effde26eef99a57c08a2e4c59e3c5918bc4eb710d88e45'
AND (
token = 'Po9s8Xt0lGjQzd1AC+Jhm+WhOPJxBH/HbuassXya1GM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)