UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V/tDDbKKnunu0ppCnjBgaCdh3NovJzBEXkf2sBlOeMI='
WHERE
key_id = '84c71899c384e66f3cf0dc8e4dea745a1a95ae6e25cc8a49b28149f8300c885f'
AND (
token = 'V/tDDbKKnunu0ppCnjBgaCdh3NovJzBEXkf2sBlOeMI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)