UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LtrJgHgWEzWjnaoGPADGbe9/ncVsDVaLAAATmAxwD7s='
WHERE
key_id = '03341a7bb41590edb63eb8ffb298d95ab0d8d3532e0a4525d79585a9c857d382'
AND (
token = 'LtrJgHgWEzWjnaoGPADGbe9/ncVsDVaLAAATmAxwD7s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)