UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '73p3nMJXZupjbtSjOUr45eX6ajNVkwJraEteiUox2pg='
WHERE
key_id = '9104ed2476d14ed561b392f7a9c2c8f841188e3945e43521213b1924543bd568'
AND (
token = '73p3nMJXZupjbtSjOUr45eX6ajNVkwJraEteiUox2pg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)