UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FigeBuCZ8+CxApd8auinbYSC/T5aUM7JWzKXtLrXxtQ='
WHERE
key_id = '30f340783f88ec47d96ffdb1ed3c577d690d88c9f6a466c45ba6e89463fac15f'
AND (
token = 'FigeBuCZ8+CxApd8auinbYSC/T5aUM7JWzKXtLrXxtQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)